From 9c4e875de440b1b60a6723d17daafcfceaa137f2 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 14 Jun 2017 16:41:41 -0400 Subject: [PATCH] objectManager: handle object manager sending empty array If the service implementing the object manager returns a 0 length array we currently throw an exception. This commit fixes that. https://bugzilla.gnome.org/show_bug.cgi?id=780403 --- js/misc/objectManager.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/misc/objectManager.js b/js/misc/objectManager.js index 225204347..c86e47ab4 100644 --- a/js/misc/objectManager.js +++ b/js/misc/objectManager.js @@ -193,6 +193,11 @@ const ObjectManager = new Lang.Class({ let [objects] = result; + if (!objects) { + this._tryToCompleteLoad(); + return; + } + let objectPaths = Object.keys(objects); for (let i = 0; i < objectPaths.length; i++) { let objectPath = objectPaths[i]; -- 2.39.5